import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const publishResultView = await client.axons.publish('id', {
event_type: 'event_type',
origin: 'EXTERNAL_EVENT',
payload: 'payload',
source: 'source',
});
console.log(publishResultView.sequence);{
"sequence": 123,
"timestamp_ms": 123
}[Beta] Publish an event to a specified axon.
import Runloop from '@runloop/api-client';
const client = new Runloop({
bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});
const publishResultView = await client.axons.publish('id', {
event_type: 'event_type',
origin: 'EXTERNAL_EVENT',
payload: 'payload',
source: 'source',
});
console.log(publishResultView.sequence);{
"sequence": 123,
"timestamp_ms": 123
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The axon identifier.
Was this page helpful?